<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ic="http://ivyteam.ch/jsf/component"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:pm="http://primefaces.org/mobile">
 
    <h:head>
        <title>#{ivy.cms.co('/axonactive/vision/training/pageTitleStudent')}</title>
    </h:head>
    <h:body>
 	<h:form>
		<p:layout fullPage="true">
			<p:layoutUnit position="north">
				<h:graphicImage library="ivy-webcontent"
						name="WEB-INF/resource/logo.gif" 
						style="float:left;"/>
				<p:outputPanel id="userInfo" style="float:right;">
					<p:panelGrid columns="3">
						<p:outputLabel value="Name"></p:outputLabel>
						<p:outputLabel value="#{data.fullname}"></p:outputLabel>
						<p:commandLink value="(log out)" actionListener="#{logic.logout}"></p:commandLink>
						<p:outputLabel value="Role"></p:outputLabel>
						<p:outputLabel value="#{data.role}"></p:outputLabel>
						<p:outputLabel value=""></p:outputLabel>
					</p:panelGrid>
				</p:outputPanel>
			</p:layoutUnit>
			<p:layoutUnit position="west">
				<p:selectOneListbox value="#{data.selectedMenu}">
						<f:selectItem itemLabel="Examination" itemValue="1"></f:selectItem>
						<f:selectItem itemLabel="Score" itemValue="2"></f:selectItem>
						<p:ajax event="change" listener="#{logic.selectMenu}" update=":#{p:component('content')}"></p:ajax>
				</p:selectOneListbox>
			</p:layoutUnit>
			<p:layoutUnit position="center">
				<p:outputPanel id="content">
					<p:outputLabel value="#{data.contentTitle}"></p:outputLabel>
				</p:outputPanel>
			</p:layoutUnit>
		</p:layout>
	</h:form>

	<p:ajaxStatus onstart="PF('statusDialog').show()"
		onsuccess="PF('statusDialog').hide()" />

	<p:dialog widgetVar="statusDialog" modal="true" draggable="false"
		closable="false" resizable="false" showHeader="false">
		<p:graphicImage library="ivy-webcontent"
			name="WEB-INF/resource/loading.gif" />
	</p:dialog>
    </h:body>
</html>